<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>main.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="css/main.css" type="text/css" rel="stylesheet" />
</head>

<body>
	<div id="panel">
		<header>
		<div id="simulationlogo">
			<a href="main.jsp"><img src="images/logo.jpg" alt="" width="226"
				height="100"> </a>
		</div>
		<div id="logo">
			<p class="title">微博信息分析与舆情仿真系统</p>
		</div>
		</header>
		<nav>
		<div>
			<a href="main?method=showMission"><strong>数据抓取</strong> </a>
		</div>
		<div>
			<a href="<c:url value="main?method=showWeibos"/>"><strong>微博主题查询




			
			</a></strong>
		</div>
		<div>
			<a href="<c:url value="main?method=showUsers"/>"><strong>意见领袖查询</strong>
			</a>
		</div>
		<div>
			<a href="<c:url value="main?method=showSimulation"/>"><strong>舆情演化仿真




			
			</a></strong>
		</div>
		</nav>
		<div id="content">

			<!-- 数据抓取以及处理模块开始 -->

			<c:if test="${panel eq 'mission'}">
				<div class="missions">
					<div>
						<div align="left">
							<strong>&nbsp;&nbsp;&nbsp;&nbsp;任务管理</strong>
						</div>
						<input class="button" type="button" value="数据处理流程图"
							onclick="selectTp()" />
					</div>
					<div class="mission">
						<p class="title">
							<img src="images/wait.png" width="107" height="76">待执行任务
						</p>
						<ul id="mission1">
							<li>雾霾</li>
							<li>禽流感</li>
							<li>春节</li>
						</ul>
					</div>
					<div class="mission right">
						<p class="title">
							<img src="images/Done.png" width="109" height="76">已完成任务
						</p>
						<ul>
							<li>H7N9 传染</li>
							<li>H7N9 谣言</li>
							<li>H7N9 感染</li>
							<li>H7N9 污染</li>
							<li>H7N9 活禽</li>
							<li>H7N9 板蓝根</li>
							<li>H7N9 疫苗</li>
						</ul>
					</div>
				</div>
				<form>
					<input id="mission-keyword" type="text" name="keyword"
						placeholder="检索词" /> <a class="button" href="javascript:void(0)"
						id="add-mission">添加任务</a>
					<button id="start" class="right">开始任务</button>
				</form>
				<div class="running">
					<p style="line-height: 30px; height: 30px;">
						<!-- 
						正在执行任务--<span class="running-miss">我是歌手</span>
					 -->
						<button class="right">停止任务</button>
					</p>
					<div class="info"></div>
				</div>
			</c:if>
			<!-- 数据抓取以及数据处理模块结束 -->

			<!-- 微博主题查询模块开始 -->
			<c:if test="${panel eq 'weibos'}">
				<form action="search">
					<p>
						<strong>&nbsp;&nbsp;&nbsp;&nbsp;微博主题查询</strong>
					</p>
					<p>
						<span>主题关键词（多个关键词用空格隔开）：</span> <input type="text" name="keyword"
							placeholder="请输入关键词" value="${keyword}" /> <span>排序规则：</span> <select
							name="sort">
							<option value="1" selected>评论次数+转发次数</option>
							<option value="2">时间</option>
							<option value="3">发布者</option>
						</select>
					</p>
					<button class="right">查询</button>
				</form>
				<c:if test="${!empty weibos}">
					<p>
						共有&nbsp;<em>${count}</em>&nbsp;条相关微博
					</p>
					<div class="gap">
						<a href="main?method=showSentiment" class="button">主题情感分析</a> <span
							style="line-height: 27px"><a href="showPositiveWeibo"
							title="点击查看该主题的正能量微博">正面情感：</a>80%&nbsp;<a
							href="showNegativeWeibo" title="点击查看该主题的负能量微博">负面情感：</a>20%</span> <a
							href="main?method=showEntity" class="button right">实体抽取</a>
					</div>
					<table>
						<tr class="ziti">
							<th width="4%"><strong>行号</strong>
							</th>
							<th width="8%"><strong>发布者</strong>
							</th>
							<th width="36%"><strong>内容</strong>
							</th>
							<th width="7%"><strong>来源</strong>
							</th>
							<th width="10%"><strong>转发/评论次数</strong>
							</th>
							<th width="15%"><strong>发布时间</strong>
							</th>
							<th width="10%"><strong>评论信息</strong>
							</th>
							<th width="10%"><strong>情感分析</strong>
							</th>
						</tr>
						<c:forEach var="weibo" varStatus="row" items="${weibos}">
							<tr>
								<td>${row.count}</td>
								<td><a
									href="main?method=showBlogger&bloggerName=${weibo.userName}&bloggerId=${weibo.userId}"
									title="点击查看该用户的详细信息">${weibo.userName}</a>
								</td>
								<td>${weibo.content}</td>
								<td>${weibo.orign}</td>
								<td>${weibo.forwordNum }/${weibo.commentNum }</td>
								<td>${weibo.publishTime}</td>
								<td><a class="button"
									href="main?method=showComments&weiboId=${weibo.weiboId}">查看评论</a>
								</td>
								<td><a class="button"
									href="main?method=showSentiment&weiboId=${weibo.weiboId}">情感分析</a>
								</td>
							</tr>
						</c:forEach>
					</table>
				</c:if>
			</c:if>
			<!-- 微博主题查询模块结束 -->
			<c:if test="${panel eq 'comments' }">
				<table>
					<tr class="ziti">
						<th width="10%"><strong>行号</strong></th>
						<th width="10%"><strong>评论者</strong></th>
						<th width="40"><strong>内容</strong></th>
						<th width="20%"><strong>发布时间</strong></th>
					</tr>
					<c:forEach var="comment" varStatus="row" items="${comments}">
						<tr>
							<td>${row.count }</td>
							<td>${comment.username}</td>
							<td>${comment.content}</td>
							<td>${comment.publishTime}</td>
						</tr>
					</c:forEach>
				</table>
			</c:if>
			<!-- 意见领袖查询模块开始 -->
			<c:if test="${panel eq 'users' }">
				<form action="blogger">
					<p>
						<strong>&nbsp;&nbsp;&nbsp;&nbsp;意见领袖查询</strong>
					</p>
					<p>
						<span>主题关键词：</span> <input name="keyword" type="text"
							value="${keyword}" placeholder="请输入关键词" /> 开始日期：<input
							name="begin-time" placeholder="点击选择日期" type="text"
							onClick="WdatePicker()" /> 结束日期：<input name="end-time"
							placeholder="点击选择日期" type="text" onClick="WdatePicker()" />
					</p>
					<button class="right">查询</button>
					<input class="button" type="button" value="意见领袖识别流程图"
						onclick="selectTpol()" />
				</form>
				<p>
					<c:if test="${!empty keyword}">关键词：${keyword}</c:if>
					<c:if test="${!empty date}">  &nbsp;&nbsp;时间：${date}</c:if>
				</p>
				<c:if test="${!empty bloggers }">

					<table>
						<tr class="ziti">
							<th width="9%"><strong>用户名</strong>
							</th>
							<th width="5%"><strong>性别</strong>
							</th>
							<th width="7%"><strong>关注数</strong>
							</th>
							<th width="7%"><strong>粉丝数</strong>
							</th>
							<th width="9%"><strong>发微博数</strong>
							</th>
							<th width="8%"><strong>所在地</strong>
							</th>
							<th width="32%"><strong>简介</strong>
							</th>
							<th width="23%"><strong>用户标签</strong>
							</th>
						</tr>
						<c:forEach var="blogger" items="${bloggers}">
							<tr>
								<td><a
									href="main?method=showTopics&bloggerId=${blogger.userId}&bloggerName=${blogger.name}"
									title="点击查看该博主参与的话题及相关微博被转发评论的总数">${blogger.name}</a>
								</td>
								<td>${blogger.gender}</td>
								<td>${blogger.followNum }</td>
								<td>${blogger.fansNum }</td>
								<td>${blogger.weiboNum }</td>
								<td>${blogger.addr }</td>
								<td>${blogger.introduce }</td>
								<td>${blogger.tagInfo }</td>
							</tr>
						</c:forEach>
					</table>
				</c:if>
			</c:if>
			<!-- 意见领袖查询模块结束 -->
			<c:if test="${panel eq 'topics' }">
				<p>
					博主&nbsp;<a href="#">${bloggerName}</a>&nbsp;所参与的话题及相关微博被转发与评论的总数如下
				</p>
				<table>
					<tr class="ziti">
						<th width="40%"><strong>话题关键词</strong></th>
						<th width="30"><strong>转发总数</strong></th>
						<th width="30%"><strong>评论总数</strong></th>
					</tr>
					<c:forEach var="topic" items="${topics}">
						<tr>
							<td>${topic.keyword}</td>
							<td>${topic.forwardSum}</td>
							<td>${topic.commentSum}</td>
						</tr>
					</c:forEach>
				</table>
			</c:if>
			<c:if test="${empty panel }">
				<div style="width: 200px; height: 500px"></div>
			</c:if>
		</div>
	</div>
	<footer>
	<p>copyright&copy;南京理工大学经济管理学院信息管理系</p>
	</footer>
</body>
</html>
